{validate form="register" id="v_username_regexp" append="error" message="Username can only contain letters, numbers, underscores and dashes (maximum of 20 characters)."}
{validate form="register" id="v_username_empty" append="error" message="Username cannot be empty."}
{validate form="register" id="v_username_unique" append="error" message="Username already exists."}
{validate form="register" id="v_password_regexp" append="error" message="Password must contain at least six characters (letters and numbers only)."}
{validate form="register" id="v_confirm_password_regexp" append="error" message="Confirm password must contain at least six characters (letters and numbers only)."}
{validate form="register" id="v_password_equal" append="error" message="Password and confirm password do not match."}
{validate form="register" id="v_email_valid" append="error" message="Email is not valid."}
{validate form="register" id="v_confirm_email_valid" append="error" message="Confirm email is not valid."}
{validate form="register" id="v_email_equal" append="error" message="Email and confirm email do not match."}
{validate form="register" id="v_email_unique" append="error" message="Email already exists."}
{validate form="register" id="v_captcha_valid" append="error" message="Security code is incorrect."}
{if $register_button}
	<div class="failed">
		{assign var="session_name" value=#SessionName#}
		{if !$smarty.cookies.$session_name}
			Either your session has expired or you have to accept cookies from this site before using it.<br />
		{/if}
		{foreach $error as $message}
			{$message}<br />
		{foreachelse}
			An unknown session error occured. Do not refresh the page or submit the form, just click again on the link that brought you to this page to create a new session.<br />
		{/foreach}
	</div>
{/if}